#ifndef FILTERBUTTON_H
#define FILTERBUTTON_H

#include <gtkmm.h>
#include "documents.h"


class FilterButton : public Gtk::HBox
{
public:
    enum IconType {FILTER,NAME,TAG,PUBLISHER,WRITING,READING,UNKOWN};
    typedef sigc::signal<void,std::string> SignalClosed;

    FilterButton();
    virtual ~FilterButton();
    virtual void set_text(const Glib::ustring t);
    virtual void set_icontype(IconType);
    virtual void set_filter(const sdms::Filter&);
    SignalClosed signal_closed();
protected:
    virtual void on_button_close();
    virtual void on_button_enter();
    virtual void on_button_leave();
    Gtk::Button m_closebutton;
    Gtk::Image m_icontype;
    Gtk::Label m_text;
    Gtk::EventBox m_eventbox;
    SignalClosed m_signal_closed;
    sdms::Filter m_filter;

private:
    FilterButton(const FilterButton&);
    FilterButton& operator=(const FilterButton&);
};

#endif // FILTERBUTTON_H
